import os
import sys
sys.path.append('../backend')
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'HuaXianGuan.settings')

import django
django.setup()

from apps.flowers.models import Flower

def update_pink_tulip_direct():
    """直接更新粉郁金香花束图片URL"""
    
    # 使用一个可靠的郁金香图片URL
    new_image_url = "https://flower-1.oss-cn-shanghai.aliyuncs.com/flowers/tulips_2.jpg"
    
    flower = Flower.objects.filter(name='粉郁金香花束').first()
    if flower:
        flower.image = new_image_url
        flower.save()
        print(f"✓ 成功更新粉郁金香花束图片: {new_image_url}")
    else:
        print("✗ 未找到粉郁金香花束")

if __name__ == "__main__":
    update_pink_tulip_direct()